package com.google.wave.gwcensor;


import java.util.HashSet;

public class ExceptPosPair {
	
	private int start;
	private int end;
	
	public ExceptPosPair(int start, int end) {
		this.start = start;
		this.end   = end;
	}
	
	public boolean isExceptPosPair(int start, int end) {
		
		if (start>= this.start && end <= this.end)
			return true;
		
		return false;
	}
	
	static boolean checkPosPair(HashSet<ExceptPosPair>		exPosPairSet, int start, int end) {
		
		for (ExceptPosPair posPair : exPosPairSet) {
    		if (posPair.isExceptPosPair(start, end)) {    			
    			return true;
    		}
    	}
		
		return false;
	}

}
